package com.github.zzay.care.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.zzay.care.dto.ElderlyDto;
import com.github.zzay.care.entity.Elderly;

import java.util.List;

/**
 * @author zzay
 * @interfaceName ElderlyService
 * @description Service interface class for entity "Elderly"
 * @create 2022/07/07 00:04
 * @see com.github.zzay.care.service.impl.ElderlyServiceImpl
 */
public interface ElderlyService extends IService<Elderly> {

    /**
     * Delete an elderly person's information.
     *
     * @param idCard ID card number
     * @return Operation result
     */
    Boolean deleteInfo(String idCard);


    /**
     * Update an elderly person's information.
     *
     * @param elderlyDto Elderly DTO
     * @return Operation result
     */
    Boolean updateInfo(ElderlyDto elderlyDto);

    /**
     * Get all information.
     *
     * @return A list of all information
     */
    List<ElderlyDto> getAll();

    /**
     * Get an elderly person's information with the given id card number.
     *
     * @param idCard ID card number
     * @return Elderly person's information
     */
    ElderlyDto getInfoById(String idCard);

    /**
     * Get an elderly person's information with the given name.
     *
     * @param name Name
     * @return Elderly person's information
     */
    ElderlyDto getInfoByName(String name);

}
